package com.looli.srb.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum BorrowerStatusEnum {

    NO_AUTH(0, "未认证"),
    AUTH_RUN(1, "认证中"),
    AUTH_OK(2, "认证通过"),
    BORROWER_FAIL(-1, "认证失败"),
    ;

    private Integer status;
    private String msg;

    public static String getMsgByStatus(Integer status) {
        BorrowerStatusEnum[] values = BorrowerStatusEnum.values();
        for (BorrowerStatusEnum value : values) {
            if (value.getStatus().equals(status)){
                return value.getMsg();
            }
        }
        return null;
    }
}
